home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Leonardo the Inventor
/
Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso
/
LEOWINMV
/
SHARED.DIR
/
03106_Script_MAC PRINT LEO II
< prev
next >
Wrap
Text File
|
1996-04-01
|
4KB
|
136 lines
-- --------------------------------------------------------------------------------------
-- Handler printScreenMAC prints a screenShot of the current 13" screen
-- (640 wide by 480 tall), scaled up to fit an 11 x 8.5 inch page...
-- (not recommended for monitors/windows smaller than 640 x 480 at this time)
-- If printSize is "card", it prints 4 cards on the page. Otherwise, it prints
-- on screenshot.
on printScreenMAC printSize
if (printSize = "card") then
printCardSizeMac
else if (printSize = "full") then
printFullSizeMAC
end if
end
-- --------------------------------------------------------------------------------------
-- Handler printFullSizeMAC prints the curren screen in landscape form.
on printFullSizeMAC fullFileName
-- 1) open the xobject
openXObjHandler "PMATIC.XOBJ"
-- 2) create a new object
set printObj = printomatic(mnew)
if not(objectP( printObj )) then
alert "Sorry...Error in printing."
exit
end if
-- 3) call the print function to print
doPrintFullScreen(printObj, fullFileName)
-- 4) close the xojbect
closeXObjHandler "PMATIC.XOBJ"
end
-- --------------------------------------------------------------------------------------
-- Handler printFileMAC
on printFileMAC printSize, fullFileName
if (printSize = "card") then
printCardSizeMac(fullFileName)
else if (printSize = "full") then
printFullSizeMAC(fullFileName)
end if
end
-- --------------------------------------------------------------------------------------
-- Handler printAllCardsMAC
on printAllCardsMAC filePathName
-- 1) open the xobject
openXObjHandler "PMATIC.XOBJ"
-- 2) call the printing function (this one creates and disposes)
doPrintAllCards(filePathName)
-- 3) close the xojbect
closeXObjHandler "PMATIC.XOBJ"
end
-- --------------------------------------------------------------------------------------
-- Handler printPictureMAC
on printPictureMAC printSize, whichCast, title, caption
-- 1) open the xobject
openXObjHandler "PMATIC.XOBJ"
-- 2) create a new object
set printObj = printomatic(mnew)
if not(objectP( printObj )) then
alert "Leo 2 - Problem opening XObject"
exit
end if
-- 3) call the print function to print
doPrintPicture(printObj, whichCast, title, caption)
-- 4) close the xojbect
closeXObjHandler "PMATIC.XOBJ"
end
-- ----------------------------------------------------------------
-- Handler printDatabaseMAC is called when the user clicks the print
-- button in the database. It prints the text or picture (whichever
-- is currently displayed) of the currently selected topic.
on printDatabaseMAC
global textButton, pictureButton
-- 1) open the xobject
openXObjHandler "PMATIC.XOBJ"
-- 2) create a new object
set printObj = printomatic(mnew)
if not(objectP( printObj )) then
alert "Sorry...Error in printing."
exit
end if
-- 3) call the print function to print
if isActivated(textButton) then
doPrintDatabaseText(printObj)
else if isActivated(pictureButton) then
doPrintDatabasePicture(printObj)
end if
-- 4) close the xojbect
closeXObjHandler "PMATIC.XOBJ"
end
-- -----------------------------------------------------------
-- Handler printCardSizeMac prints four of the current screen on a
-- landscape page.
on printCardSizeMac fullFileName
-- 1) open the xobject
openXObjHandler "PMATIC.XOBJ"
-- 2) create a new object
set printObj = printomatic(mnew)
if not(objectP( printObj )) then
alert "Sorry...Error in printing."
exit
end if
-- 3) call the print function to print
doPrintCardSize(printobj, fullFileName)
-- 4) close the xojbect
closeXObjHandler "PMATIC.XOBJ"
end